import org.omg.CORBA.PUBLIC_MEMBER;

/**
 * @Author 12629
 * @Description：
 */
class MyValue{
    public int val;
}

class A {
    public void func(int a) {

    }
}

class B extends A {
    public void func() {

    }
}

public class Test{

    public static void swap(MyValue myVal1,MyValue myVal2) {
        int tmp = myVal1.val;
        myVal1.val = myVal2.val;
        myVal2.val = tmp;
    }

    public static void main(String[] args) {
        MyValue myValue1 = new MyValue();
        myValue1.val = 10;
        MyValue myValue2 = new MyValue();
        myValue2.val = 20;
        System.out.println(myValue1.val);
        System.out.println(myValue2.val);
        System.out.println("=================");
        swap(myValue1,myValue2);
        System.out.println(myValue1.val);
        System.out.println(myValue2.val);
    }

    public static void swap(int[] array) {
        int tmp = array[0];
        array[0] = array[1];
        array[1] = tmp;
    }

    public static void main1(String[] args) {
        int[] array = {10,20};
        System.out.println(array[0]+" "+array[1]);
        swap(array);
        System.out.println(array[0]+" "+array[1]);
    }

}
